package com.cpms.framework.common.exception;

/**
 * @description: 自定义校验实体类属性字段异常类
 * @author: gulang
 * @time: 2021/6/23 17:42
 */
public class ValidateParamException extends RuntimeException implements IException {
    private Integer code;
    private String message;
    private Object obj;

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }


    @Override
    public Object getObj() {
        return obj;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public void setObj(Object obj) {
        this.obj = obj;
    }

    public ValidateParamException(){

    }
    /**
     * 只有异常信息构造方法
     */
    public ValidateParamException(String  message) {
        this.message=message;
    }

    /**
     *  自定义异常信息
     * @param code
     * @param message
     */
    public ValidateParamException(Integer code, String  message) {
        this.code=code;
        this.message=message;
    }

}
